let header_v = new Vue({
    el:"header",
    data:{
        c_arr:[{id:1,name:'lsm'},{id:2,name:'lll'}],/*负责装导航条菜单标签*/
        users:"",
        ors:false,
        or:true
    },
    created:function () {
        //发出请求,获取菜单标签信息
        axios.get("category/select").then(function (response) {
            header_v.c_arr = response.data;
            // header_v.hasError = true;
        }),
        axios.get("/users/session").then(function (response) {
            if (response.data!=""){
                header_v.ors=true;
                header_v.users=response.data;
                header_v.or=false;
            }
        })
    },
    methods:{
        logout:function () {
            axios.get("/user/logout").then(function (response) {
                if (confirm("您确定退出么?")){
                    location.reload();
                }
            })
        }
    }
})



























